<script>------------------------------------------------------------------------ balloon helpon mouseEnterput "The Variable Name." & return & return into aput "To change the name, type in this field and then press the return key." into bShowABalloon a & bend mouseEnteron mouseLeaveRemoveABalloonend mouseLeave----------------------------------------------------------------------On OpenFieldglobal holdNameput me into holdNameEnd openFieldOn closeFieldglobal holdName,kMaxItems,gSwapput me into newNameIF newName is empty THENbeepAnswer "Variable names cannot be blank."put holdName into meExit to HyperCardEND IFIF Length(newName) > 60 THENbeepAnswer "Variable names cannot exceed 60 characters."put holdName into meExit to HyperCardEND IFset cursor to 4If gSwap="True" then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IFEnd Ifput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardRepeat with J=startCard to (startCard+Delta-1)put newName into bkgnd field "Variable Name" of Card JEnd RepeatIf gSwap="True" thenput newName into Line variableNumber of bkgnd field "holdVariables" ¬of Card 1put char 1 to 30 of newName into Line variableNumber of bkgnd ¬field "Companies" of Card 1put char 1 to 2 of newName into Line variableNumber of bkgnd ¬field "Abbrevs" of Card 1Elseput newName into Line variableNumber of bkgnd field "Indicators" ¬of Card 1-- In case of a Swapput char 1 to 30 of newName into Line variableNumber of bkgnd ¬field "holdItems" of Card 1put char 1 to 2 of newName into Line variableNumber of bkgnd ¬field "holdAbbrevs" of Card 1End If-- Handle that the data is now different; below is not eloquent-- clean-up laterput empty into bkgnd field "Variables" of Card 1put empty into bkgnd field "SelectedMeasures" of Card 1put empty into bkgnd field "SelectedSigs" of Card 1put empty into bkgnd field "VariableNumbers" of Card 1put empty into bkgnd field "Min" of Card 1put empty into bkgnd field "Max" of Card 1select after text of bkgnd field "Measures"End closeField</script>
</part>
<part>
<id>2</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>478</left>
<top>13</top>
<right>501</right>
<bottom>27</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>bold</textStyle>
<textHeight>13</textHeight>
<name>SigDigits</name>
<script>------------------------------------------------------------------------ balloon helpon mouseEnterput me into sigIf sig=0 then put "whole numbers." into bIf sig=1 then put "tenths." into bIf sig=2 then put "hundreths." into bIf sig=3 then put "thousandths." into bIf sig=4 then put "ten thousandths." into bput "The precision with which the Variable is measured."into aput "This Variable is measured in" && b & return & return into bput "To change the precision, enter a whole number between 0 and 4 into this field and then press the return key." into cShowABalloon a && b & cend mouseEnteron mouseLeaveRemoveABalloonend mouseLeave----------------------------------------------------------------------On OpenFieldglobal holdSigput me into holdSigEnd openFieldOn closeFieldglobal holdSig,kMaxItems,gSwapput me into newSigput the numberFormat into tempNumset the numberFormat to "0"-- Insure its a numberIf newSig is not an integer thenbeepput "The Sig. Digit is not a proper number."into stringAnswer stringput holdSig into meexit to HyperCardEnd IfIF newSig>4 or newSig<0 THENbeepAnswer "Sig. Digit must be between 0 and 4."put holdSig into meExit to HyperCardEND IF-- any decimals to int.Put trunc(newSig) into meset the numberFormat to tempNum -- re-set numberFormatset cursor to 4If gSwap="True" then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IFEnd Ifput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardRepeat with J=startCard to (startCard+Delta-1)put newSig into bkgnd field "SigDigits" of Card JEnd RepeatIf gSwap="True" thenput newSig into Line variableNumber of bkgnd field "holdSigs" ¬of Card 1Elseput newSig into Line variableNumber of bkgnd field "SigDigits" ¬of Card 1End If-- Handle that the data is now different; below is not eloquent-- clean-up laterput empty into bkgnd field "Variables" of Card 1put empty into bkgnd field "SelectedMeasures" of Card 1put empty into bkgnd field "SelectedSigs" of Card 1put empty into bkgnd field "VariableNumbers" of Card 1put empty into bkgnd field "Min" of Card 1put empty into bkgnd field "Max" of Card 1select after text of bkgnd field "Variable Name"End closeField</script>
</part>
<part>
<id>3</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>1</top>
<right>41</right>
<bottom>17</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>bold</textStyle>
<textHeight>13</textHeight>
<name>Letter</name>
<script></script>
</part>
<part>
<id>4</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>5</left>
<top>87</top>
<right>73</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Time Units</name>
<script>on mouseWithinglobal initScrollIf the style of me is scrolling thenIf the scroll of me<>initScroll thenget the scroll of meput it into initScrollUpdateScrollend ifEnd IfEnd mouseWithinon mouseUpput word 2 of the clickline into LineNumselect Line LineNum of meEnd mouseUp</script>
</part>
<part>
<id>120</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>77</left>
<top>87</top>
<right>153</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Data 1</name>
<script></script>
</part>
<part>
<id>121</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>136</left>
<top>87</top>
<right>204</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Data 2</name>
<script></script>
</part>
<part>
<id>123</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>187</left>
<top>87</top>
<right>255</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Data 3</name>
<script></script>
</part>
<part>
<id>124</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>237</left>
<top>87</top>
<right>305</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Data 4</name>
<script></script>
</part>
<part>
<id>125</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>288</left>
<top>87</top>
<right>356</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Data 5</name>
<script></script>
</part>
<part>
<id>126</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>339</left>
<top>87</top>
<right>407</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Data 6</name>
<script></script>
</part>
<part>
<id>127</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>390</left>
<top>87</top>
<right>458</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Data 7</name>
<script></script>
</part>
<part>
<id>128</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>441</left>
<top>87</top>
<right>509</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Data 8</name>
<script></script>
</part>
<part>
<id>129</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>86</left>
<top>63</top>
<right>136</right>
<bottom>85</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Abbrev. 1</name>
<script></script>
</part>
<part>
<id>130</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>137</left>
<top>63</top>
<right>187</right>
<bottom>85</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Abbrev. 2</name>
<script></script>
</part>
<part>
<id>131</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>188</left>
<top>63</top>
<right>238</right>
<bottom>85</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Abbrev. 3</name>
<script></script>
</part>
<part>
<id>132</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>239</left>
<top>63</top>
<right>289</right>
<bottom>85</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Abbrev. 4</name>
<script></script>
</part>
<part>
<id>133</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>290</left>
<top>63</top>
<right>340</right>
<bottom>85</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Abbrev. 5</name>
<script></script>
</part>
<part>
<id>134</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>341</left>
<top>63</top>
<right>391</right>
<bottom>85</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Abbrev. 6</name>
<script></script>
</part>
<part>
<id>135</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>392</left>
<top>63</top>
<right>442</right>
<bottom>85</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Abbrev. 7</name>
<script></script>
</part>
<part>
<id>136</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>443</left>
<top>63</top>
<right>493</right>
<bottom>85</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Abbrev. 8</name>
<script></script>
</part>
<part>
<id>137</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>151</left>
<top>36</top>
<right>386</right>
<bottom>53</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>bold</textStyle>
<textHeight>13</textHeight>
<name>Measures</name>
<script>------------------------------------------------------------------------ balloon helpon mouseEnterput "The Measurement Unit of the Variable." & return & return into aput "To change the measure, type in this field and then press the return key." into bShowABalloon a & bend mouseEnteron mouseLeaveRemoveABalloonend mouseLeave----------------------------------------------------------------------On OpenFieldglobal holdMeasureput me into holdMeasureEnd openFieldOn closeFieldglobal kMaxItems,gSwapput me into newMeasureIF Length(newMeasure) > 60 THENbeepAnswer "Measures cannot exceed 60 characters."put holdMeasure into meExit to HyperCardEND IFset cursor to 4If gSwap="True" then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IFEnd Ifput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardRepeat with J=startCard to (startCard+Delta-1)put newMeasure into bkgnd field "Measures" of Card JEnd RepeatIf gSwap="True" thenput newMeasure into Line variableNumber of bkgnd field "holdMeasures" ¬of Card 1Elseput newMeasure into Line variableNumber of bkgnd field "Measures" ¬of Card 1End If-- Handle that the data is now different; below is not eloquent-- clean-up laterput empty into bkgnd field "Variables" of Card 1put empty into bkgnd field "SelectedMeasures" of Card 1put empty into bkgnd field "SelectedSigs" of Card 1put empty into bkgnd field "VariableNumbers" of Card 1put empty into bkgnd field "Min" of Card 1put empty into bkgnd field "Max" of Card 1select after text of bkgnd field "SigDigits"End closeField</script>
</part>
<part>
<id>138</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>86</left>
<top>86</top>
<right>121</right>
<bottom>337</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Predict Field 5</name>
<script></script>
</part>
<part>
<id>139</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>136</left>
<top>86</top>
<right>173</right>
<bottom>337</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Predict Field 6</name>
<script></script>
</part>
<part>
<id>140</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>187</left>
<top>87</top>
<right>224</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Predict Field 7</name>
<script></script>
</part>
<part>
<id>141</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>237</left>
<top>87</top>
<right>274</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Predict Field 8</name>
<script></script>
</part>
<part>
<id>142</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>288</left>
<top>86</top>
<right>326</right>
<bottom>337</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Predict Field 9</name>
<script></script>
</part>
<part>
<id>143</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>339</left>
<top>87</top>
<right>374</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Predict Field 10</name>
<script></script>
</part>
<part>
<id>144</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>391</left>
<top>87</top>
<right>425</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Predict Field 11</name>
<script></script>
</part>
<part>
<id>145</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>441</left>
<top>86</top>
<right>479</right>
<bottom>337</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <true /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>Predict Field 12</name>
<script></script>
</part>
<part>
<id>146</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>409</left>
<top>313</top>
<right>485</right>
<bottom>329</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Reverse</name>
<script>on mouseUpglobal gDoAll,gCompactStack,kMaxItems,gFirst,gSwapput 0 into Kput true into gFirstPredictFieldsput false into gFirstIf gSwap="True" then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IFEnd If -- gSwapput the number of this card into cardNumput the number of cards into numCardsput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardIf gDoAll thenput 2 into startIndexput numCards into endIndexElseput startCard into startIndexput (startCard+Delta-1) into endIndexEnd IfRepeat with J= startIndex to endIndexIF J=cardNum then next repeatIf gDoAll then setAllHilites JGo to Card JPredictFieldsEnd RepeatGo to Card CardNum-- Initializeput empty into gDoAllput empty into itemsSelectedput empty into gFirsthide msgIf the freeSize of this stack >gCompactStack then DoMenu "Compact Stack"end mouseUp</script>
</part>
<part>
<id>147</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>493</left>
<top>87</top>
<right>510</right>
<bottom>338</bottom>
</rect>
<style>opaque</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name></name>
<script></script>
</part>
<part>
<id>148</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>17</left>
<top>33</top>
<right>41</right>
<bottom>50</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>24317</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Card 1</name>
<script>------------------------------------------------------------------------ balloon helpon mouseEnterput "To go to the first card, click here." into aShowABalloon aend mouseEnteron mouseLeaveRemoveABalloonend mouseLeave----------------------------------------------------------------------on mouseUpDoMenu "First"end mouseUp</script>
</part>
<part>
<id>149</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>7</left>
<top>52</top>
<right>30</right>
<bottom>70</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>15420</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Prev</name>
<script>------------------------------------------------------------------------ balloon helpon mouseEnterput "To go to the previous card, click here." into aShowABalloon aend mouseEnteron mouseLeaveRemoveABalloonend mouseLeave----------------------------------------------------------------------on mouseUpDoMenu "Prev"end mouseUp</script>
</part>
<part>
<id>150</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>29</left>
<top>52</top>
<right>47</right>
<bottom>71</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>16560</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Next</name>
<script>------------------------------------------------------------------------ balloon helpon mouseEnterput "To go to the next card, click here." into aShowABalloon aend mouseEnteron mouseLeaveRemoveABalloonend mouseLeave----------------------------------------------------------------------on mouseUpDoMenu "Next"end mouseUp</script>
</part>
<part>
<id>151</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>37</left>
<top>7</top>
<right>152</right>
<bottom>23</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>bold</textStyle>
<textHeight>16</textHeight>
<name></name>
<script>on mouseUpselect text of meEnd mouseUp</script>
</part>
<part>
<id>152</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>408</left>
<top>36</top>
<right>472</right>
<bottom>57</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Modify</name>
<script>on mouseUpglobal itemNumber,kMaxItems,gSwap,delta,numVariables,numItems-- Always do the delete on Items last so predictions aren't affectedIf the selection =empty thenIf gSwap="True" then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IFEnd If -- gSwapput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardput true into nothingSelectedRepeat with J=(startCard+Delta-1) down To startCardRepeat with K=22 down To 15If hilite of bg btn K of Cd J is true thengo to cd Jput K-14 into itemNumbersend mouseUp to bkgnd button "deleteItem"put false into nothingSelectedEnd IfEnd RepeatEnd RepeatIf nothingSelected thenAnswer "Nothing has been selected."exit to HyperCardElseIf (bkgnd fld 13 of last card) is empty then -- if yes then there are blank cards-- delete blank cards and re-numberput "Deleting blank cards."put 2 into Jlock screenRepeat Foreverput (J-1) into bkgnd fld "Letter" of card JIf (bkgnd fld 13 of card J) is empty thenGo to Card JdoMenu "Delete Card"Elseadd 1 to JEnd If -- (bkgnd fld 13 of card J) is emptyIf J>number of cds then exit repeatEnd RepeatEnd If -- (bkgnd fld 13 of last card) is emptyGo to cd 1hide msgunlock screenEnd If -- nothingSelectedElseput last word of the selectedLine into fieldNumberset the loc of msg to 2,20If fieldNumber=31 then send mouseUp to bkgnd button "deleteVariable"If fieldNumber=4 then send mouseUp to bkgnd button "deleteUnit"End IFput empty into fieldNumber -- initialize the globalsput empty into deltaput empty into numVariablesput empty into numItemsput empty into bkgnd fld "Min" of Card 1put empty into bkgnd fld "Max" of Card 1put empty into bkgnd fld "NumX" of Card 1put empty into bkgnd fld "NumY" of Card 1End mouseUp</script>
</part>
<part>
<id>153</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>2</left>
<top>316</top>
<right>102</right>
<bottom>338</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>deleteItem</name>
<script>on mouseUpGlobal kMaxItems,gCompactStack,gSwap,itemNumber,delta,numVariables,numItemsput Line 1 of bkgnd fld (itemNumber+12) && Line 2 of ¬bkgnd fld (itemNumber+12) into itemNameput "Delete" && itemName && "?" into phraseAnswer phrase with "Delete" or "Cancel"If it="Cancel" then exit to Hypercardset the hilite of bg btn (itemNumber+14) to falseset the cantAbort of this stack to truepush Cardgo to Card 1lock screenpop Cardset cursor to 4-- set up to initailize boolean predict fieldsput number of lines of bkgnd field "Units" of Card 1 into numTimeUnitsRepeat with L= 1 to numTimeUnitsput False into Line L of bkgnd field "PredictDummy" of Card 1End Repeat --Lput bkgnd field "PredictDummy" of Card 1 into holdBooleanput empty into bkgnd field "PredictDummy" of Card 1 -- re-initialze-- If gSwap then-- -- delta below is actually the number of cards/variable-- put the number of lines of bkgnd field 3 of Card 1 into numVariables-- put the number of lines of bkgnd field 1 of Card 1 into numItems-- put (numItems div kMaxItems) + 1 into delta-- If numItems mod kMaxItems = 0 then-- subtract 1 from delta-- End If-- Else-- -- delta below is actually the number of cards/variable-- put the number of lines of bkgnd field 1 of Card 1 into numVariables-- put the number of lines of bkgnd field 3 of Card 1 into numItems-- put (numItems div kMaxItems) + 1 into delta-- If numItems mod kMaxItems = 0 then-- subtract 1 from delta-- End If-- End If-- Don't delete if there is only one item leftIf numItems=1 thenAnswer "Can't delete the last item."exit to HyperCardEnd Ifput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCard-- Actually make it the item numberput (cardNum-startCard)*kMaxItems + itemNumber into itemNumberput "Deleting" && itemNameRepeat with J=1 to numVariablesput ((J-1)*delta)+1 into startCardput startCard +(itemNumber div kMaxItems) into dataCardIf itemNumber mod kMaxItems = 0 then subtract 1 from dataCardadd 1 to datacard -- data begin with second card of this stackGo to Card dataCardput bkgnd fld "Variable Name" into phraseput "Deleting" && itemName && "from" && phrase &"." into phraseput phraseDeleteItem itemNumber,numItems,holdBooleanEnd RepeatGo to Card 1If gSwap="True" thenDelete Line itemNumber of bkgnd fld "Indicators"Delete Line itemNumber of bkgnd fld "Measures"Delete Line itemNumber of bkgnd fld "SigDigits"Delete Line itemNumber of bkgnd fld "holdItems"Delete Line itemNumber of bkgnd fld "holdAbbrevs"-- Handle selected variables on Card 1; Variable Numbers have changedPut empty into bkgnd fld "Variables"Put empty into bkgnd fld "SelectedMeasures"Put empty into bkgnd fld "SelectedSigs"Put empty into bkgnd fld "VariableNumbers"ElseDelete Line itemNumber of bkgnd fld "Companies"Delete Line itemNumber of bkgnd fld "Abbrevs"Delete Line itemNumber of bkgnd fld "holdVariables"Delete Line itemNumber of bkgnd fld "holdMeasures"Delete Line itemNumber of bkgnd fld "holdSigs"-- Handle selected items on Card 1; Item Numbers have changedPut empty into bkgnd fld "Items"Put empty into bkgnd fld "SelectedAbbrevs"Put empty into bkgnd fld "ItemNumbers"End IfRepeat with J= 11 to 14Delete Line itemNumber of cd fld J -- the hold fieldsEnd RepeatPut "Checking the Preselections."-- Handle the preselectionsput the number of lines of bg fld "Preselected" into numSelectionsRepeat with J=1 to numSelectionsput line J of bg fld "Preselected" into tempput the number of items of temp into numEntriesput 2 into K -- the preselection name is the first itemRepeat until K>numEntriesput item K of temp into tempItemIf tempItem=itemNumber thendelete Item K of tempsubtract 1 from numEntriesElse If tempItem>itemNumber thensubtract 1 from Item K of tempadd 1 to KElseadd 1 to KEnd IfEnd Repeat -- Kput temp into line J of bg fld "Preselected"End Repeat -- J-- Delete lines with no entries, i.e., only the preselection nameRepeat with J=numSelections down to 1If the number of items of line J of bg fld "Preselected"=1 then delete line J of bg fld "Preselected"End RepeatBuildPreSelectMenu -- rebuild the Preselect emnu (bgnd script)set the cantAbort of this stack to falseIf the freeSize of this stack >gCompactStack then DoMenu "Compact Stack"hide msgunlock screenend mouseUpon DeleteItem itemNumber,numItems,holdBooleanGlobal kMaxItemsRepeat with K = itemNumber to numItemsput K mod kMaxItems into TempIf Temp<>0 thenput bkgnd fld (Temp+4+1) into bkgnd fld (Temp+4)put bkgnd fld (Temp+12+1) into bkgnd fld (Temp+12)put bkgnd fld (Temp+21+1) into bkgnd fld (Temp+21)ElseIf K<>numItems thenput the number of this card into thisCardput bkgnd fld 5 of Card (thisCard+1) into bkgnd fld (kMaxItems+4)put bkgnd fld 13 of Card (thisCard+1) into bkgnd fld (kMaxItems+12)put bkgnd fld 22 of Card (thisCard+1) into bkgnd fld (kMaxItems+21)Go NextEnd IfEnd IfIf K=numItems then -- We're endingIf Temp<> 0 then add 1 to temp Else put kMaxItems into Tempput empty into bkgnd fld (temp+4)put empty into bkgnd fld (temp+12)put holdBoolean into bkgnd fld (temp+21)End IfEnd Repeat -- KEnd DeleteItem</script>
</part>
<part>
<id>154</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>108</left>
<top>314</top>
<right>231</right>
<bottom>336</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>deleteVariable</name>
<script>on mouseUpglobal gCompactStack,kMaxItems,gSwapput bkgnd fld "Variable Name" into variableNameput "Delete" && variableName && "?" into phraseAnswer phrase with "Delete" or "Cancel"If it="Cancel" thenselect emptyexit to HyperCardEnd Ifput the number of this card into cardNumset the cantAbort of this stack to truego to Card 1lock screenset cursor to 4If gSwap then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfEnd Ifput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardput 1 into KGo to Card startCardRepeat delta timesPut "Deleting" && variableName & ": Data Card" && K && "."doMenu "Delete Card"add 1 to KEnd Repeat-- Renumber CardsPut "Re-numbering the data cards."Repeat with J=2 to the number of cardsput (J-1) into bkgnd fld "Letter" of Card JEnd RepeatGo to card 1If gSwap thenDelete Line variableNumber of bkgnd fld "Companies"Delete Line variableNumber of bkgnd fld "Abbrevs"Delete Line variableNumber of bkgnd fld "holdVariables"Delete Line variableNumber of bkgnd fld "holdMeasures"Delete Line variableNumber of bkgnd fld "holdSigs"-- Handle selected items on Card 1; Variable Numbers have changedPut empty into bkgnd fld "Items"Put empty into bkgnd fld "ItemNumbers"Put empty into bkgnd fld "SelectedAbbrevs"ElseDelete Line variableNumber of bkgnd fld "Indicators"Delete Line variableNumber of bkgnd fld "Measures"Delete Line variableNumber of bkgnd fld "SigDigits"Delete Line variableNumber of bkgnd fld "holdItems"Delete Line variableNumber of bkgnd fld "holdAbbrevs"-- Handle selected items on Card 1; Variable Numbers have changedPut empty into bkgnd fld "Variables"Put empty into bkgnd fld "VariableNumbers"Put empty into bkgnd fld "SelectedSigs"Put empty into bkgnd fld "SelectedMeasures"End Ifset the cantAbort of this stack to falseIf the freeSize of this stack >gCompactStack then DoMenu "Compact Stack"hide msgend mouseUp</script>
</part>
<part>
<id>155</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>234</left>
<top>314</top>
<right>357</right>
<bottom>336</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>deleteUnit</name>
<script>on mouseUpGlobal gCompactStackput the selection into deleteUnitput "Delete" && deleteUnit && "?" into phraseAnswer phrase with "Delete" or "Cancel"If it="Cancel" thenselect emptyexit to HyperCardEnd Ifset the cantAbort of this stack to trueput word 2 of the selectedLine into lineNumbergo to Card 1lock screenset cursor to 4put "Deleting" && deleteUnit && "from all data cards."Repeat with J=2 to number of Cardsput (J-1) into tempput "Deleting" && deleteUnit && "from Data Card" && temp &"."Repeat with K= 4 to 12delete Line lineNumber of bkgnd fld K of Card JIF K<>4 then delete Line lineNumber of bkgnd fld (K+17) of Card JEnd repeatEnd RepeatDelete Line lineNumber of bkgnd fld "Units"-- Handle selected items on Card 1; Unit Numbers have changedPut empty into bkgnd fld "SelectedUnits"Put empty into bkgnd fld "UnitNumbers"set the cantAbort of this stack to falseIf the freeSize of this stack >gCompactStack then DoMenu "Compact Stack"hide msgend mouseUp</script>
</part>
<part>
<id>156</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>404</left>
<top>60</top>
<right>471</right>
<bottom>83</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Select</name>
<script>Function TimeUnits-- get the time units for min, max or range computationsglobal gwhichTime,gStartUnit-- Get the time unit for the computationsIf gwhichTime="First" then put "Enter the first Time Unit." into Phrase ¬Else put "Enter the last Time Unit." into PhraseIf gwhichTime="First" then Ask Phrase with first line of bkgnd fld "Time Units" ¬Else Ask Phrase with last line of bkgnd fld "Time Units"If it is empty then Exit to HyperCardput it into timeUnitIf timeUnit is not a number thenput "The unit is not a proper number."into stringAnswer stringReturn TimeUnits()End If-- Check that the unit actually existsput false into gotITput the number of lines of bkgnd field "Units" of Card 1 ¬into numTimeUnitsRepeat with J= 1 to numTimeUnitsIf timeUnit=Line J of bkgnd Field 4 thenput True into gotITexit repeatEnd IfEnd repeatIF not(gotIT) thenAnswer "Your TIme Unit does not exist." with "Cancel" or "Again"If it is "Cancel" then Exit to HyperCard Else Return TimeUnits()End IFIf (gwhichTime="Last") and (gStartUnit>J) thenAnswer "Last unit is less than first unit." with "Cancel" or "Again"If it is "Cancel" then Exit to HyperCard Else Return TimeUnits()End IFReturn J -- We actually want the line number, not the unitEnd TimeUnits-----------------------------------------------------------------------Function numItems whichglobal gSwap,gStartUnit,gEndUnit-- Get the number of min or max to determineput "Enter number of ranks for the" && which & "." into phraseask phraseif it is empty then exit to HyperCardput it into tempIf temp is not an integer thenAnswer "A proper integer was not entered." with "Cancel" or "Again"If it is "Cancel" then Exit to HyperCardReturn numItems (which)End IfIf gSwap = "true" thenput (number of lines of bkgnd fld "Indicators" of Card 1) into maxRanksElseput (number of lines of bkgnd fld "Companies" of Card 1) into maxRanksEnd Ifput maxRanks*(gEndUnit-gStartUnit+1) into maxRanksIf temp>maxRanks thenAnswer "There are not that many entries." with "Cancel" or "Again"If it is "Cancel" then Exit to HyperCardReturn numItems (which)End IfReturn tempEnd numItems-----------------------------------------------------------------------Function aValue-- Get the values for the range determinationask "Select all values less than or equal to" with 1000000000If it is empty then exit to Hypercardput it into temp1If temp1 is not a number thenAnswer "A proper number was not entered." with "Cancel" or "Again"If it is "Cancel" then Exit to HyperCardReturn aValue()End Ifask "Select all values greater than or equal to" with -1000000000If it is empty then exit to Hypercardput it into temp2If temp2 is not a number thenAnswer "A proper number was not entered." with "Cancel" or "Again"If it is "Cancel" then Exit to HyperCardReturn aValue()End IfIf temp1<temp2 thenAnswer "Your range can have no values." with "Cancel" or "Again"If it is "Cancel" then Exit to HyperCardReturn aValue()End Ifput temp1 && temp2 into tempReturn tempEnd aValue-- ---------------------------------------------------------------------on getMin numLines-- get the minimum "companies"global kMaxItems,holdMin,gStartUnit,gEndUnit-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 11 of Card 1 into numTimeUnitsput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 then subtract 1 from deltaput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardput 0 into numCards -- count the number of cards checkedRepeat with J=startCard to (startCard+Delta-1)add 1 to numCardsPut (numCards-1)*kMaxItems into cdsDone -- count the number of cds already checkedRepeat with K=1 to kMaxItemsput cdsDone + K into itemsDoneIf itemsDone<=numItems then put "Checking" && itemsDone && "of" && numItems && "Items."If (bkgnd fld (4+K) of card J) is empty then next repeatput ((numCards-1)*kMaxItems)+K into itemLineRepeat with L = gStartUnit to gEndUnitput line L of bkgnd fld (4+K) of card J into tempIf (temp is empty) or (temp is not a number) then next repeatRepeat with M=1 to numLinesIf temp<=Line M of holdMin thenput itemLine & Return before line M of bg fld "forTransfer"put Line itemLine of bkgnd fld "holdVariables" of Card 1 into temp2put Line L of bkgnd fld 4 of Card J into temp3put (temp2 && temp3) && Temp & return ¬before Line M of bkgnd fld "Rank"If temp<>Line M of holdMin thendelete last line of bkgnd fld "Rank"delete last line of bkgnd fld "forTransfer"End Ifput temp & Return before line M of holdMindelete last line of holdMinexit repeatEnd IfEnd Repeat --MEnd repeat -- LEnd Repeat -- KEnd Repeat -- J-- Heading info at end for Transfer btnPut bg fld "Variable Name" into varNameput line gStartUnit of bg fld 4 into firstUnitput line gEndUnit of bg fld 4 into lastUnitPut Return & Return & "*" & varName &":" && numLines && "minimum Items" into aPut Return & "First Unit:" && firstUnit & ";" && "Last Unit:" && lastUnit into bput a & b after bg fld "Rank"end getMin----------------------------------------------------------------------------------------------------------------------------------------------on getMax numLines-- get the maximum "companies"global kMaxItems,holdMin,gStartUnit,gEndUnit-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 11 of Card 1 into numTimeUnitsput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 then subtract 1 from deltaput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardput 0 into numCards -- count the number of cards checkedput 0 into itemsCheckedRepeat with J=startCard to (startCard+Delta-1)add 1 to numCardsPut (numCards-1)*kMaxItems into cdsDone -- count the number of cds already checkedRepeat with K=1 to kMaxItemsput cdsDone + K into itemsDoneIf itemsDone<=numItems then put "Checking" && itemsDone && "of" && numItems && "Items."If (bkgnd fld (4+K) of card J) is empty then next repeatput ((numCards-1)*kMaxItems)+K into itemLineRepeat with L = gStartUnit to gEndUnitput line L of bkgnd fld (4+K) of card J into tempIf (temp is empty) or (temp is not a number) then next repeatRepeat with M=1 to numLinesIf temp>=Line M of holdMin thenput itemLine & Return before line M of bg fld "forTransfer"put Line itemLine of bkgnd fld "holdVariables" of Card 1 into temp2put Line L of bkgnd fld 4 of Card J into temp3put (temp2 && temp3) && Temp & return ¬before Line M of bkgnd fld "Rank"--txIf temp<>Line M of holdMin thendelete last line of bkgnd fld "Rank"delete last line of bkgnd fld "forTransfer"End Ifput temp & Return before line M of holdMindelete last line of holdMinexit repeatEnd IfEnd Repeat --MEnd repeat -- LEnd Repeat -- KEnd Repeat -- J-- Heading info at end for Transfer btnPut bg fld "Variable Name" into varNameput line gStartUnit of bg fld 4 into firstUnitput line gEndUnit of bg fld 4 into lastUnitPut Return & Return & "*" & varName &":" && numLines && "maximum Items" into aPut Return & "First Unit:" && firstUnit & ";" && "Last Unit:" && lastUnit into bput a & b after bg fld "Rank"end getMax----------------------------------------------------------------------------------------------------------------------------------------------on getRange min,max-- get the "companies" that fall within the selected rangeglobal kMaxItems,gStartUnit,gEndUnit-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 11 of Card 1 into numTimeUnitsput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 then subtract 1 from deltaput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardput 0 into numCards -- count the number of cards checkedRepeat with J=startCard to (startCard+Delta-1)add 1 to numCardsPut (numCards-1)*kMaxItems into cdsDone -- count the number of cds already checkedRepeat with K=1 to kMaxItemsput cdsDone + K into itemsDoneIf itemsDone<=numItems then put "Checking" && itemsDone && "of" && numItems && "Items."If (bkgnd fld (4+K) of card J) is empty then next repeatput ((numCards-1)*kMaxItems)+K into itemLineRepeat with L = gStartUnit to gEndUnitput line L of bkgnd fld (4+K) of card J into tempIf (temp is empty) or (temp is not a number) then next repeatIf (temp>=min) and (temp<=max) thenput Line itemLine of bkgnd fld "holdVariables" of Card 1 into temp2put Line L of bkgnd fld 4 of Card J into temp3If bkgnd fld "Rank" is empty thenput temp2 && temp3 && Temp after bkgnd fld "Rank"put itemLine after bkgnd fld "forTransfer"Elseput return & temp2 && temp3 && Temp after bkgnd fld "Rank"put return & itemLine after bkgnd fld "forTransfer"End IfEnd IfEnd repeat -- LEnd Repeat -- KEnd Repeat -- J-- Heading info at end for Transfer btnPut bg fld "Variable Name" into varNameput line gStartUnit of bg fld 4 into firstUnitput line gEndUnit of bg fld 4 into lastUnitPut Return & Return & "*" & varName &":" && "Range of Values" into aPut Return & "Minimum Value:" && min & ";" && "Maximum Value:" && max into bput a & b after bg fld "Rank"end getRange-----------------------------------------------------------------------on mouseUpglobal holdMin, kmaxItems,gwhichTime,gStartUnit,gEndUnit,gSwapAnswer "Select by what?" with "Cancel" or "Range" or "Min/Max"If it = "Cancel" then exit to HyperCard else put it into firstChoiceIf firstChoice="Min/Max" thenAnswer "By mimimum or maximum?" with "Cancel" or "Minimum" or "Maximum"If it = "Cancel" then exit to HyperCard else put it into whichIf which="minimum" then put 1000000000 into temp else ¬put -1000000000 into tempput "first" into gwhichTimeget TimeUnits ()put it into gStartUnit--put itput "last" into gwhichTimeget TimeUnits ()put it into gEndUnit-- put itget numItems (which)put it into numLinesput empty into holdMinset the cursor to 4put empty into bkgnd fld "Rank"put empty into bkgnd fld "forTransfer"set the scroll of bkgnd fld "Rank" to 0If not(visible of bg fld "Rank") then send mouseUp to bg btn 12 -- Show/Hide Selection-- Make sure than card 1 has not been swappedIf gSwap="True" thenlock screenpush cardGo to Card 1send mouseUp to cd btn "Swap" of Card 1pop cardunlock screenput "true" into swapBackElseput "false" into swapBackEnd IfRepeat with J=1 to numLines -- these are all dummy entriesput temp into Line J of holdMinput "no entry" into Line J of bkgnd fld "Rank"put 0 into Line J of bkgnd fld "forTransfer"End repeatEnd IfIf firstChoice="Range" thenget aValue()put it into tempput word 1 of temp into maxput word 2 of temp into minput "Range" into whichput "first" into gwhichTimeget TimeUnits ()put it into gStartUnit--put itput "last" into gwhichTimeget TimeUnits ()put it into gEndUnit-- put itset the cursor to 4put empty into bkgnd fld "Rank"put empty into bkgnd fld "forTransfer"set the scroll of bkgnd fld "Rank" to 0show bkgnd fld "Rank"show bkgnd btn "Transfer"show bkgnd btn "Print"set the name of menuItem 2 of menu "Modify" to "Hide Selection"set the name of bg btn 12 to "Hide Selection"-- Make sure than card 1 has not been swappedIf gSwap="True" thenlock screenpush cardGo to Card 1send mouseUp to cd btn "Swap" of Card 1pop cardunlock screenput "true" into swapBackElseput "false" into swapBackEnd IfEnd IfIf which="minimum" then getMin numLinesIf which="maximum" then getMax numLinesIf which="Range" then getRange min,maxIf which<>"Range" then-- Handle if there are more lines than numLines and not all-- are duplicatesput last word of line numLines of bkgnd fld "Rank" into tempput number of lines of bkgnd fld "Rank" into totLinesput totLines-3 into totLines -- last three lines are return plus heading infoRepeat with J=totLines down to (numLines+1)If last word of Line J of bkgnd fld "Rank"<>temp thendelete Line J of bkgnd fld "Rank"delete Line J of bkgnd fld "forTransfer"End IfEnd Repeat-- Handle if there were not a sufficient number of min,max, or ranges to fullfill the requestRepeat with J=totLines down to 1Put Line J of bkgnd fld "Rank" into tempIf temp=empty then next repeat -- odd case where there is no data for an itemIf (temp="No Entry") then delete Line J of bkgnd fld "Rank" ¬Else Exit RepeatEnd RepeatEnd Ifput "Making final adjustments."-- return swap to its original conditionIf swapBack = "True" thenlock screenpush cardGo to Card 1send mouseUp to cd btn "Swap" of Card 1pop cardunlock screenEnd If-- eliminate duplicates from "forTransfer" field-- If gStartUnit <> gEndUnit then -- no duplicates for one time period, but there can be zerosput 1 into StartRepeat until (Start-1)=the number of lines of bg fld "forTransfer"put the number of lines of bg fld "forTransfer" into numLinesput Line Start of bg fld "forTransfer" into tempRepeat with J=numLines down to (Start+1)put Line J of bg fld "forTransfer" into temp2-- temp2=0 is odd case where there is no data for an itemIf (temp=temp2) or (temp2=0) then delete Line J of bg fld "forTransfer"End Repeatadd 1 to StartEnd Repeat-- End If-- number the linesput number of lines of bg fld "Rank" - 3 into numLinesRepeat with J=1 to numLinesput J & ")" & space before Line J of bg fld "Rank"End Repeatput empty into holdMinput empty into gStartUnitput empty into gEndUnithide msgbeepend mouseUp</script>
</part>
<part>
<id>157</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>77</left>
<top>178</top>
<right>493</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Rank</name>
<script></script>
</part>
<part>
<id>158</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>406</left>
<top>195</top>
<right>470</right>
<bottom>218</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Transfer</name>
<script>on mouseUpglobal kMaxItems,gSwapIf bkgnd fld "Rank" is empty thenAnswer "You have no selection to transfer."exit to HyperCardEnd Ifset the cantAbort of this stack to true-- Below calculations are used if rankings are placed on summary cardIf gSwap="True" then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 11 of Card 1 into numTimeUnitsput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 11 of Card 1 into numTimeUnitsput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfEnd Ifput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberset the cursor to 4-- First initialize variable and items parametersput empty into bkgnd field "Variables" of Card 1put empty into bkgnd field "SelectedMeasures" of Card 1put empty into bkgnd field "SelectedSigs" of Card 1put empty into bkgnd field "VariableNumbers" of Card 1put empty into bkgnd field "Min" of Card 1put empty into bkgnd field "Max" of Card 1put empty into bkgnd fld "Launch" of Card 1put empty into bkgnd fld "Items" of Card 1put empty into bkgnd fld "SelectedAbbrevs" of Card 1put empty into bkgnd fld "ItemNumbers" of Card 1put empty into bkgnd fld "SelectedUnits" of Card 1 -- time alsoput empty into bkgnd fld "UnitNumbers" of Card 1-- Handle this variable; either as a variable or item on Card 1If gSwap="True" then-- all fields have been already initialized to emptyput Line variableNumber of bkgnd fld "Companies" of Card 1 ¬into Line 1 of bkgnd fld "Items" of Card 1put Line variableNumber of bkgnd fld "Abbrevs" of Card 1 ¬into Line 1 of bkgnd fld "SelectedAbbrevs" of Card 1put variableNumber into Line 1 of bkgnd fld "ItemNumbers" of Card 1Else-- all fields have been already initialized to emptyput Line variableNumber of bkgnd fld "Indicators" of Card 1 ¬into Line 1 of bkgnd fld "Variables" of Card 1put Line variableNumber of bkgnd fld "Measures" of Card 1 ¬into Line 1 of bkgnd fld "SelectedMeasures" of Card 1put Line variableNumber of bkgnd fld "SigDigits" of Card 1 ¬into Line 1 of bkgnd fld "SelectedSigs" of Card 1put variableNumber into Line 1 of bkgnd fld "VariableNumbers" of Card 1End If-- Handle selected items; either as variables or items on card 1If gSwap="True" then-- all fields have been already initialized to emptyput Line variableNumber of bkgnd fld "Companies" of Card 1 ¬into Line 1 of bkgnd fld "Items" of Card 1put Line variableNumber of bkgnd fld "Abbrevs" of Card 1 ¬into Line 1 of bkgnd fld "SelectedAbbrevs" of Card 1put variableNumber into Line 1 of bkgnd fld "ItemNumbers" of Card 1Else-- all fields have been already initialized to emptyput Line variableNumber of bkgnd fld "Indicators" of Card 1 ¬into Line 1 of bkgnd fld "Variables" of Card 1put Line variableNumber of bkgnd fld "Measures" of Card 1 ¬into Line 1 of bkgnd fld "SelectedMeasures" of Card 1put Line variableNumber of bkgnd fld "SigDigits" of Card 1 ¬into Line 1 of bkgnd fld "SelectedSigs" of Card 1put variableNumber into Line 1 of bkgnd fld "VariableNumbers" of Card 1End If-- Handle selected items; either as variables or items on card 1If gSwap="True" thenput 1 into countput number of lines of bkgnd fld "forTransfer" into dataLinesRepeat with J= 1 to dataLinesput "Transfering" && J && "of" && dataLines && "Items."put line J of bkgnd fld "forTransfer" into variableNumberput Line variableNumber of bg fld "Indicators" of cd 1 into ¬Line count of bg fld "Variables" of cd 1put Line variableNumber of bkgnd fld "Measures" of Card 1 into ¬Line count of bkgnd fld "SelectedMeasures" of Card 1put Line variableNumber of bkgnd fld "SigDigits" of Card 1 into ¬Line count of bkgnd fld "SelectedSigs" of Card 1put variableNumber into Line count of bkgnd fld "variableNumbers" of card 1add 1 to countEnd repeat --JElseput 1 into countput number of lines of bkgnd fld "forTransfer" into dataLinesRepeat with J= 1 to dataLinesput "Transfering" && J && "of" && dataLines && "Items."put line J of bkgnd fld "forTransfer" into itemNumberput Line itemNumber of bg fld "Companies" of cd 1 into ¬Line count of bg fld "Items" of cd 1put Line itemNumber of bkgnd fld "Abbrevs" of Card 1 into ¬Line count of bkgnd fld "SelectedAbbrevs" of Card 1put itemNumber into Line count of bkgnd fld "ItemNumbers" of card 1add 1 to countEnd repeat --JEnd Ifhide msgset the cantAbort of this stack to falsebeepend mouseUp</script>
</part>
<part>
<id>159</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>407</left>
<top>238</top>
<right>471</right>
<bottom>260</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>GoNext</name>
<script>on mouseUpglobal kMaxItems,gSwapIf not(gSwap) thenput the number of lines of bkgnd field 1 of cd 1 into numVariablesput the number of lines of bkgnd field 3 of cd 1 into numItemsElseput the number of lines of bkgnd field 3 of cd 1 into numVariablesput the number of lines of bkgnd field 1 of cd 1 into numItemsend Ifput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 then subtract 1 from deltaput number of cds into numCdsput the number of this card into cardNumput cardNum+delta into nextCardIf nextCard>numCds then put (nextCard mod numCds) + 1 into nextCardgo to card nextCardend mouseUp</script>
</part>
<part>
<id>160</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>206</left>
<top>140</top>
<right>306</right>
<bottom>162</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Show Selection</name>
<script>on mouseUpIf the visible of bkgnd fld "Rank" is true thenhide bkgnd fld "Rank"hide bkgnd btn "Transfer"hide bkgnd btn "Print"set the name of me to "Show Selection"set the name of menuItem 2 of menu "Modify" to "Show Selection"Elsehide bg fld "Predict Info"set the name of bg btn 23 to "Show Predict Info"set the name of menuItem 4 of menu "Predictions" to "Show Predict Info"show bkgnd fld "Rank"show bkgnd btn "Transfer"show bkgnd btn "Print"set the name of me to "Hide Selection"set the name of menuItem 2 of menu "Modify" to "Hide Selection"End Ifend mouseUp</script>
</part>
<part>
<id>161</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>421</left>
<top>206</top>
<right>485</right>
<bottom>228</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>GoPrev</name>
<script>on mouseUpglobal kMaxItems,gSwapIf not(gSwap) thenput the number of lines of bkgnd field 1 of cd 1 into numVariablesput the number of lines of bkgnd field 3 of cd 1 into numItemsElseput the number of lines of bkgnd field 3 of cd 1 into numVariablesput the number of lines of bkgnd field 1 of cd 1 into numItemsend Ifput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 then subtract 1 from deltaput number of cds into numCdsput the number of this card into cardNumput cardNum-delta into nextCardIf nextCard<2 then put numCds+nextCard-1 into nextCardgo to card nextCardend mouseUp</script>
</part>
<part>
<id>162</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>406</left>
<top>223</top>
<right>471</right>
<bottom>247</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Print</name>
<script>on mouseUpIf bg fld "Rank" is empty thenAnswer "There is nothing to print."exit to HyperCardEnd IfPut bg fld "Rank" into temp-- get the heading to the beginingput the number of lines of temp into numLinesput line (NumLines-2) to numLines of temp into holdDelete line (NumLines-2) to numLines of tempDelete first line of holdput the short name of this stack into aNameput bg fld "Measures" into aMeasureIf aMeasure is empty then put "no measurement unit" into aMeasureput offset(":",hold) into placeput char 1 to (place-1) of hold && "(" & aMeasure & "):" into char 1 to place of holdput aName & return & hold & return & return before tempprint tempend mouseUp</script>
</part>
<part>
<id>163</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>0</left>
<top>149</top>
<right>33</right>
<bottom>332</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>forTransfer</name>
<script></script>
</part>
<part>
<id>164</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>86</left>
<top>63</top>
<right>136</right>
<bottom>85</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Cover1</name>
<script>on mouseUpPut the number of me into ButtonNosetHilite ButtonNoend mouseUp</script>
</part>
<part>
<id>165</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>137</left>
<top>63</top>
<right>187</right>
<bottom>85</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Cover2</name>
<script>on mouseUpPut the number of me into ButtonNosetHilite ButtonNoend mouseUp</script>
</part>
<part>
<id>166</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>188</left>
<top>63</top>
<right>238</right>
<bottom>85</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Cover3</name>
<script>on mouseUpPut the number of me into ButtonNosetHilite ButtonNoend mouseUp</script>
</part>
<part>
<id>167</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>239</left>
<top>63</top>
<right>289</right>
<bottom>85</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Cover4</name>
<script>on mouseUpPut the number of me into ButtonNosetHilite ButtonNoend mouseUp</script>
</part>
<part>
<id>168</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>290</left>
<top>63</top>
<right>340</right>
<bottom>85</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Cover5</name>
<script>on mouseUpPut the number of me into ButtonNosetHilite ButtonNoend mouseUp</script>
</part>
<part>
<id>169</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>341</left>
<top>63</top>
<right>391</right>
<bottom>85</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Cover6</name>
<script>on mouseUpPut the number of me into ButtonNosetHilite ButtonNoend mouseUp</script>
</part>
<part>
<id>170</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>392</left>
<top>63</top>
<right>442</right>
<bottom>85</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Cover7</name>
<script>on mouseUpPut the number of me into ButtonNosetHilite ButtonNoend mouseUp</script>
</part>
<part>
<id>171</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>443</left>
<top>63</top>
<right>493</right>
<bottom>85</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Cover8</name>
<script>on mouseUpPut the number of me into ButtonNosetHilite ButtonNoend mouseUp</script>
</part>
<part>
<id>172</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>86</left>
<top>54</top>
<right>136</right>
<bottom>85</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Info1</name>
<script></script>
</part>
<part>
<id>173</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>136</left>
<top>54</top>
<right>186</right>
<bottom>85</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Info2</name>
<script></script>
</part>
<part>
<id>174</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>188</left>
<top>54</top>
<right>238</right>
<bottom>85</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Info3</name>
<script></script>
</part>
<part>
<id>175</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>239</left>
<top>54</top>
<right>289</right>
<bottom>85</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Info4</name>
<script></script>
</part>
<part>
<id>176</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>290</left>
<top>54</top>
<right>340</right>
<bottom>85</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Info5</name>
<script></script>
</part>
<part>
<id>177</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>341</left>
<top>54</top>
<right>391</right>
<bottom>85</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Info6</name>
<script></script>
</part>
<part>
<id>178</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>392</left>
<top>54</top>
<right>442</right>
<bottom>85</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Info7</name>
<script></script>
</part>
<part>
<id>179</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>443</left>
<top>54</top>
<right>493</right>
<bottom>85</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Info8</name>
<script></script>
</part>
<part>
<id>180</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>85</left>
<top>180</top>
<right>493</right>
<bottom>338</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Predict Info</name>
<script></script>
</part>
<part>
<id>181</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>267</left>
<top>263</top>
<right>418</right>
<bottom>284</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Show Predict Info</name>
<script>on mouseUpIf the visible of bkgnd fld "Predict Info" is true thenhide bkgnd fld "Predict Info"set the name of me to "Show Predict Info"set the name of menuItem 4 of menu "Predictions" to "Show Predict Info"Elsehide bkgnd fld "Rank"hide bkgnd btn "Transfer"hide bkgnd btn "Print"set the name of bg btn 12 to "Show Selection"set the name of menuItem 2 of menu "Modify" to "Show Selection"show bkgnd fld "Predict Info"set the name of me to "Hide Predict Info"set the name of menuItem 4 of menu "Predictions" to "Hide Predict Info"End Ifend mouseUp</script>
</part>
<part>
<id>182</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>206</left>
<top>300</top>
<right>350</right>
<bottom>334</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Delete Predictions</name>
<script>on mouseUpglobal startCard,endCard,itemsSelected,gCompactStack-- Extent of predictionsAnswer "Delete predictions for:" ¬with "Cancel" or "All Variables" or "This Variable"If it="Cancel" then cleanExit -- in bkgndIf it="This Variable" then put False into deleteAll Else put True into deleteAllset cursor to 4If deleteAll then -- delete for all variablesput 2 into startCardput number of cds into endCardEnd Ifpush cardput number of lines of bg fld 4 into numTimeUnitsput false into gotOne -- indicates if at least on prediction has been made;used for Predict FieldRepeat with J=startCard to endCardIf deleteAll then setAllHilites JRepeat with K= 15 to 22IF hilite of bg button K of cd J is true Thenput true into gotOnego to cd JPut bkgnd Field 1 into VariableNameput line 1 of bg Field (K-2) && line 2 of bg Field (K-2) into aNamePut VariableName & ":" && "Deleting predictions for" && aNameRepeat with L=1 to numTimeUnitsIf line L of bg fld (K+7) = true thenput false into line L of bg fld (K+7) -- boolean fieldsput empty into line L of bg fld (K-10) -- data fieldsEnd IfEnd Repeat --Lput empty into bg fld (K+19) -- predict info fieldset hilite of bg button K to falseEnd If -- hilite of bg button K of cd J is trueEnd Repeat -- K; i.e. itemsIf gotOne thenput "Updating predict info."addPredictInfoEnd Ifput false into gotOneEnd Repeat -- J; i.e. cardspop cardhide msgIf the freeSize of this stack >gCompactStack then DoMenu "Compact Stack"cleanExitend mouseUp</script>
</part>
<name></name>
<script>-- balloon helpon closeBackgroundRemoveABalloonend closeBackground----------------------------------------------------------------------------------------------------------------------------------------------on OpenBackgroundIf there is a menu "Font" then delete menu "Font"If there is a menu "Style" then delete menu "Style"If there is a menu "Tools" then delete menu "Tools"If there is a menu "Objects" then delete menu "Objects"If there is a menu "Utilities" then delete menu "Utilities"If there is a menu "Create" then delete menu "Create"If there is a menu "Add" then delete menu "Add"If there is a menu "Preselected" then delete menu "Preselected"put the short name of bg btn 12 into aNamecreate menu "Modify"put "Select..." after menu "Modify" with menuMsg "Send mouseUp to bg btn 9"put aName after menu "Modify" with menuMsg "Send mouseUp to bg btn 12"put "-" after menu "Modify"put "Delete..." after menu "Modify" with menuMsg "Send mouseUp to bg btn 5"put "-" after menu "Modify"put "Go Next Variable" after menu "Modify" with menuMsg "Send mouseUp to bg btn 11"put "Go Previous Variable" after menu "Modify" with menuMsg "Send mouseUp to bg btn 13"put "-" after menu "Modify"put "Reset HyperCard Menus" after menu "Modify" with menuMsg "Reset MenuBar"set the cmdChar of menuItem "Go Next Variable" of menu "Modify" to "5"set the cmdChar of menuItem "Go Previous Variable" of menu "Modify" to "6"put the short name of bg btn 23 into aNamecreate menu "Predictions"put "Linear..." after menu "Predictions"-- put "Quadratic..." after menu "Predictions"put "Exponential..." after menu "Predictions"put "-" after menu "Predictions"put aName after menu "Predictions" with menuMsg "Send mouseUp to bg btn 23"put "-" after menu "Predictions"put "Reverse..." after menu "Predictions" with menuMsg "Send mouseUp to bg btn 1"put "Delete Predictions..." after menu "Predictions" with menuMsg "Send mouseUp to bg btn 24"End OpenBackground----------------------------------------------------------------------------------------------------------------------------------------------on UpdateScrollglobal initScrollrepeat with J= 4 to 12set the scroll of bkgnd Field J to initScrollEnd RepeatEnd UpdateScroll----------------------------------------------------------------------------------------------------------------------------------------------Function Unitsglobal gwhich-- Get the unitIf gwhich="First" then put "Enter the first Time Unit." into Phrase ¬Else put "Enter the last Time Unit." into PhraseIf gwhich="First" then Ask Phrase with first line of bg fld 4 ¬Else Ask Phrase with last line of bg fld 4If it is empty then Exit to HyperCardput it into timeUnitIf timeUnit is not a number thenput "The unit is not a proper number."into stringAnswer stringReturn Units ()End If-- Check that the unit actually existsput false into gotITput the number of lines of bkgnd field "Units" of Card 1 ¬into numTimeUnitsRepeat with J= 1 to numTimeUnitsIf timeUnit=Line J of bkgnd Field 4 thenput True into gotITexit repeatEnd IfEnd repeatIF not(gotIT) thenAnswer "Your TIme Unit does not exist." with "Cancel" or "Again"If it is "Cancel" then Exit to HyperCard Else Return Units ()End IFReturn J -- We actually want the line number, not the unitEnd Units----------------------------------------------------------------------------------------------------------------------------------------------on PredictFieldsGlobal gWhich,kMaxItems,gfirstLine,glastLine,gDoAll,gBool,gFirstIf gFirst Then-- Get the time units to begin and end withput "First" into gWhichGet Units ()Put it into gfirstLineput "Last" into gWhichGet Units ()Put it into glastLineIf gfirstLine>glastLine thenAnswer "First unit cannot be greater than the last!"exit to HyperCardEnd IfAnswer "Change values for the items to: "¬with "Cancel" or "Actual" or "Predicted"If it="Cancel" then Exit to HyperCardIf it="Actual" then put "False" into gBool Else put "True" into gBool-- Get Extent of changesAnswer "Make Changes for:" ¬with "Cancel" or "All Variables" or "This Variable"If it="Cancel" then exit to HyperCardIf it="This Variable" then put False into gDoAll ¬Else put True into gDoAllEnd If --If gFirstSet the cursor to 4If gBool=False thenput "Designating predicted values as actual values." into PhraseElseput "Designating actual values as predicted values." into PhraseEnd IFPut bkgnd Field 1 into VariableNamePut VariableName &":" && Phrase into PhrasePut Phraseset the cursor to 4Repeat with J= 1 to kMaxItems-- get out if there is no itemIf bkgnd Field (J+12) is empty then exit repeatIf the hilite of bg btn (J+14) is true thenRepeat with K= gfirstLine to glastLinePut gBool into line K of bkgnd Field (4+J+17)End Repeatset the hilite of bg btn (J+14) to falseEnd IfEnd Repeatend PredictFields----------------------------------------------------------------------------------------------------------------------------------------------On keyDown whichKeyIf (whichKey=numToChar(8)) thenIf the selection is empty then -- delete an Item?If (the target contains "field" or the visible of msg is true) then put false into goOn ¬Else put true into goOn -- Modify button will handle if nothing's been selectedElseput the number of words of the selectedLine into numWdsput (numWds-3+1) into startWd -- get last three words of selectedLineput word startWd to numWds of the selectedLine into gotItIf the first word of gotIt is "bkgnd" thenput true into goOnelseput false into goOnEnd IfIf goOn thenput the last word of gotIt into fieldNumberIf not((fieldNumber=31) or (fieldNumber=4)) then put false into goOnEnd IfEnd If -- selection is emptyIf goOn thensend mouseUp to bg btn "Modify"Elsepass keydownEnd If -- If goOnElsepass keydownEnd If --(whichKey=numToChar(8))end keyDown---------------------------------------------------------------------------------------------on setHilite ButtonNoglobal gSwap,kMaxItems-- Abort conditionsIf bkgnd Field (ButtonNo-2) is empty then Exit setHiliteIf the shiftKey is down and the optionKey is down then Exit setHiliteIf the shiftKey is down and the commandKey is down then Exit setHiliteIf the commandKey is down and the optionKey is down then Exit setHiliteIf gSwap="True" then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IFEnd Ifput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardput the hilite of bg Button ButtonNo into boolIf the commandKey is down thenset cursor to 4Repeat with J=startCard to (startCard+Delta-1)IF bool is False thenRepeat with K=15 to 22If bkgnd Field (K-2) of cd J is not empty then ¬ -- the fields holding item namesset the hilite of bg Button K of cd J to TrueEnd RepeatElseRepeat with K=15 to 22set the hilite of bg Button K of cd J to FalseEnd RepeatEnd IfEnd Repeatexit to HyperCardEnd If -- command key downIf the optionKey is down thenRepeat with J= 15 to 22If bkgnd Field (J-2) is not empty thenIf bool is true then set hilite of bg button J to false ¬Else set hilite of bg button J to trueEnd IfEnd Repeatexit to HypercardEnd If -- option keyIf the shiftKey is down thenIf bool is False thenset the hilite of bg button buttonNo to TrueElseset the hilite of bg button buttonNo to FalseEnd IfElse -- shift key not downIf bool is False thenset cursor to 4Repeat with J=startCard to (startCard+Delta-1)Repeat with K=15 to 22set the hilite of bg button K of cd J to FalseEnd RepeatEnd Repeatset the hilite of bg button buttonNo to TrueEnd If -- If bool is true don't do anthingEnd IfEnd setHilite-------------------------------------------------------------------------- PREDICTION CODE BELOW--------------------------------------------------------on doMenu itemName, menuNameglobal gFormula, kMaxItems,gSwap,startCard,endCard,itemsSelected,deltaput "Linear...,Quadratic...,Exponential..." into formulasput "Reverse...,Delete Predictions..." into othersIf (itemName is in formulas) or (itemName is in others) thenIf gSwap="True" then-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 3 of Card 1 into numVariablesput the number of lines of bkgnd field 1 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IfElse-- delta below is actually the number of cards/variableput the number of lines of bkgnd field 1 of Card 1 into numVariablesput the number of lines of bkgnd field 3 of Card 1 into numItemsput (numItems div kMaxItems) + 1 into deltaIf numItems mod kMaxItems = 0 thensubtract 1 from deltaEnd IFEnd If -- gSwapput the number of this card into cardNumput (cardnum-1) div delta +1 into variableNumberIf (cardnum-1) mod delta = 0 then subtract 1 from variableNumberput ((variableNumber-1) * delta) + 2 into startCardput true into nothingSelectedput empty into itemsSelectedput (startCard+Delta-1) into endCard -- for StarUnit functionRepeat with J=(startCard+Delta-1) down To startCardput J-(startCard-1) into lineNumRepeat with K=22 down To 15If hilite of bg btn K of Cd J is true thenput false into nothingSelectedput K & "," before line lineNum of itemsSelectedEnd IfEnd RepeatEnd RepeatIf nothingSelected thenAnswer "Choose at least one item."exit to HyperCardElseIf itemName is in formulas thenput itemName into gFormulaPredictElsepass doMenuEnd IfEnd IfElsepass doMenuEnd IfEnd doMenu-- -------------------------------------------------------------------Function StartUnitglobal gFormula,startCard,endCard-- eliminate ellipsesput length(gFormula) into tempdelete char (temp-2) to temp of gFormula-- First make sure time units are OK if exponential fitIf gFormula="Exponential" thenput Line 1 of bg fld 4 into temp1If temp1<0 then put -1 into plusMinus else put 1 into plusMinusRepeat with J= 2 to number of lines of bg fld 4put Line J of bg fld 4 into temp2If temp2<0 then put -1 into newplusMinus else put 1 into newplusMinusIf (plusMinus<>newplusMinus) or (temp1=0) or (temp2=0) thenAnswer "For exponential fit all units positive or all negative and none zero." with "Cancel"exit to HyperCardEnd IfEnd RepeatEnd Ifput gFormula && "Prediction:" && "Select a starting unit." into phraseAsk phrase with LIne 1 of bkgnd Field 4If it is empty then cleanExitput it into startTime-- Check that the unit actually existsput false into gotITRepeat with J= 1 to number of lines of bg fld 4If startTime=Line J of bkgnd Field 4 thenput True into gotITput J into start --What is actually sent to the XCMDexit repeatEnd IfEnd repeatIF not(gotIT) thenAnswer "Your starting unit does not exist." with "Cancel" or "Again"If it is "Cancel" then cleanExit Else Return StartUnit ()End IFReturn startEnd StartUnit-- -------------------------------------------------------------------on addPredictInfo-- Put Info into Predict Info fieldlock screenput the scroll of bg fld "Predict Info" into holdput empty into bkgnd Field "Predict Info" -- just insurancePut empty into TempRepeat with J= 34 to 41If bg fld (J-21) is empty then exit repeatput line 1 of bg Field (J-21) && line 2 of bg Field (J-21) into aNamePut Temp & aName &":"& Return into TempIf bkgnd Field J is empty thenPut Temp & "No prediction" into TempElsePut Temp & bkgnd Field J into TempEnd IFPut Temp & Return & Return into TempEnd Repeatput temp into bg Field "Predict Info"set the scroll of bg fld "Predict Info" to holdunlock screenEnd addPredictInfo-- -------------------------------------------------------------------on cleanExit -- abort predictionsglobal gFormula,startCard,endCard,gNumTimeUnits,gSigTime,gTooLong,itemsSelected,deltaput empty into gFormulaput empty into startCardput empty into endCardput empty into gNumTimeUnitsput empty into gSigTimeput empty into gTooLongput empty into itemsSelectedput empty into deltaput empty into numVariablesexit to HyperCardend cleanExit-- --------------------------------------------------------------------- -------------------------------------------------------------------on setAllHilites cardNum -- set hilites of all items on the card to be predictedglobal itemsSelected,delta -- itemsSelected is assigned in doMenuput (cardNum-1) mod delta into lineNumIf lineNum=0 then put delta into lineNumRepeat with J= 15 to 22If J is in line lineNum of itemsSelected thenset hilite of bg btn J of cd cardNum to TrueElseset hilite of bg btn J of cd cardNum to FalseEnd IfEnd RepeatEnd setAllHilites-- --------------------------------------------------------------------- -------------------------------------------------------------------On Predictglobal gFormula,startCard,endCard,gCompactStack,gNumTimeUnits,gSigTime,gTooLongput 0 into gTooLongput the number of lines of bg fld 4 into gNumTimeUnits -- a holdover from the original XCMDIf gNumTimeUnits>500 thenAnswer "Can't predict on more than 500 points."cleanExitEnd Ifput bg fld 21 of cd 1 into gSigTime-- Pick a starting time unitGet StartUnit ()put it into startput Line start of bg fld 4 into startTimeset the cursor to 4If gFormula="Linear" then put 2 into minPointsIf gFormula="Quadratic" then put 3 into minPointsIf gFormula="Exponential" then put 2 into minPoints-- Extent of predictionsAnswer "Make predictions for:" ¬with "Cancel" or "All Variables" or "This Variable"If it="Cancel" then cleanExitIf it="This Variable" then put False into DoAll Else put True into doAllIf doAll then -- predict all variablesput 2 into startCardput number of cds into endCardEnd Ifset cursor to 4push cardput false into gotOne -- indicates if at least on prediction has been made;used for Predict FieldRepeat with J=startCard to endCardIf doAll then setAllHilites JRepeat with K= 15 to 22IF hilite of bg button K of cd J is true Thenput true into gotOnego to cd JPut bkgnd Field 1 into VariableNameput line 1 of bg Field (K-2) && line 2 of bg Field (K-2) into aName-- reset numberFormat from prior changes or XCMD gives nonsenseset the numberFormat to "0"put value(K-10) into fieldNumPut VariableName & ":" && gFormula && "Prediction for" && aName-- beepput 0 into count -- make sure minPoint<=number of values-- Make sure there are blank values to actually predictput false into Blanksput 0 into PlusMinus -- for exponential prediction onlyRepeat with L= start to number of Lines of bg fld 4If (line L of bkgnd Field (K-10) = "?") or ¬(line L of bkgnd Field (K-10) = empty) then put true into BlanksELSEadd 1 to countEnd If -- "?" or blankIf gFormula="Exponential" then -- Exponenuial predict onlyIf (line L of bkgnd Field (K-10) <> "?") and (line L of bkgnd Field (K-10) <> empty) thenIf PlusMinus=0 thenIf line L of bkgnd Field (K-10)<0 then Put -1 into PlusMinus ¬Else put 1 into PlusMinusEnd IfIf PlusMinus<>0 thenIf line L of bkgnd Field (K-10)<0 then Put -1 into Temp ¬Else put 1 into Temp-- Ensure non-equalityIf line L of bkgnd Field (K-10)=0 then put 2 into TempIf PlusMinus<>Temp then Exit RepeatEnd IfEnd IfEnd IfEnd Repeat --L; i.e. time unitsIf gFormula="Exponential" then -- Exponential predict onlyIf PlusMinus<>Temp then-- Answer aName & ": All positive or all negative and not zero."set hilite of bg button K to falsenext repeatEnd IfEnd IfIf Blanks="False" then-- Answer aName && "has no blank values for predictions."set hilite of bg button K to falsenext repeatEnd IFIf count<minPoints then-- Answer aName & ": At least" && minPoints && "points are required."set hilite of bg button K to falsenext repeatEnd IF-- Below handles a HC bug where negative decimals are otherwise-- truncated to integers; its repeated later on for safetyPut bkgnd Field 2 into sigIF sig =0 then set NumberFormat to "0"IF sig =1 then set NumberFormat to "0.#"IF sig =2 then set NumberFormat to "0.##"IF sig =3 then set NumberFormat to "0.###"IF sig =4 then set NumberFormat to "0.####"put empty into bg fld (K+19)put "Start=" & startTime into Line 2 of bkgnd Field (K+19) of cd J--Actually call the appropriate XCMDIF gFormula = "Linear" then CurveFitting fieldNum,start,1IF gFormula = "Quadratic" then CurveFitting fieldNum,start,2IF gFormula = "Exponential" then CurveFitting fieldNum,start,3set hilite of bg button K to falseEnd If -- hilite is trueEnd Repeat -- K: i.e itemsIf gotOne thenIf not(visible of bg fld "Predict Info") then send mouseUp to bg btn 23 -- Show/Hide Predict Infoput "Updating predict info."addPredictInfoEnd Ifput false into gotOneEnd Repeat -- J; i.e. cards-- Handle too many digitsIf gTooLong<>0 then Answer "Predictions have exceed Discovery's maximum length of 10."If the freeSize of this stack >gCompactStack then DoMenu "Compact Stack"hide msgpop cardcleanExitEnd Predict------------------------------------------------------------------------END PREDICTIONS------------------------------------------------------------------------</script>